package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import java.util.Set;

/**
 * 会员组
 */
@Getter
@Setter
@ToString
@Entity
@DynamicUpdate
@DynamicInsert
public class CmMemberGroup extends BaseEntity<Integer> {

    private String name;
    @Column(nullable = false)
    @ColumnDefault("1")
    private Byte updatable;

    @OneToMany(mappedBy = "memberGroup")
    private Set<CmMember> members;

}
